<?php
/**
 * Created by PhpStorm.
 * User: peter
 * Date: 2018/6/16
 * Time: 下午4:40
 */

namespace app\model;


class WeChat extends Base
{
    protected $pk = 'uid';
    // 此处表名请务必设置为public
    public $table = 'wechat';

    /**
     * @purpose 关联Member模型
     * @return \think\model\relation\HasOne
     */
    public function member() {
        return $this
            ->hasOne('Member', 'uid', 'uid')
            ->bind('uuid,mobile,username,nickname,avatar,password,encrypt,agent,balance,invitation,invitation_from,create_ip,last_login_ip,now_ip,last_login_time,now_time');
    }
}